/*
 * Copyright (c) 2016-2017 fulihui.com All right reserved
 * Project: information-core-170307
 * File name: ContentVoteService.java
 */

package com.fulihui.information.api;

import com.fulihui.information.dto.ContentDTO;
import com.fulihui.information.dto.ContentListItemDTO;
import com.fulihui.information.request.ContentVoteRequest;
import org.near.servicesupport.result.BaseResult;
import org.near.servicesupport.result.TPageResult;
import org.near.servicesupport.result.TSingleResult;

/**
 * @author Willard.Hu on 2017/2/21 0021.
 */
public interface ContentVoteService {

    /**
     * 对资讯内容点赞
     * @param request {@link ContentVoteRequest}
     * @return {@link BaseResult}
     */
    BaseResult vote(ContentVoteRequest request);

    /**
     * 按主键查询单个数据
     * @param request {@link ContentVoteRequest}
     * @return 类型 赞 or 不喜欢 or null
     */
    TSingleResult<String> querySingle(ContentVoteRequest request);

    /**
     * 用户点赞的资讯
     * @param request {@link ContentVoteRequest}
     * @return {@link ContentDTO} 列表
     */
    TPageResult<ContentListItemDTO> userVotes(ContentVoteRequest request);
}
